Make 04_memset_smallmem differentiate between console run-away and console
authordan@guaranine.beaverton.ibm.com <dan@guaranine.beaverton.ibm.com>
Wed, 23 Nov 2005 11:31:30 +0000 (12:31 +0100)
committerdan@guaranine.beaverton.ibm.com <dan@guaranine.beaverton.ibm.com>
Wed, 23 Nov 2005 11:31:30 +0000 (12:31 +0100)
daemon death.

tools/xm-test/lib/XmTestLib/Test.py
tools/xm-test/tests/memset/04_memset_smallmem_pos.py

index 728ae12f053b94433e9546f004fb37fc3966edfa..f6bc681cb1579b597a0d4a7469f40485cd3cdd10 100644 (file)
@@ -161,6 +161,29 @@ def timeStamp():
     print "*** Test %s started at %s %s" % (name, t,
                                             time.tzname[time.daylight])
 
+#
+# Try to start a domain and attach a console to it to see if
+# the console system is working
+#
+def isConsoleDead():
+
+    from XmTestLib import XmTestDomain, DomainError, XmConsole, ConsoleError
+
+    domain = XmTestDomain()
+
+    try:
+        domain.start()
+        console = XmConsole(domain.getName())
+    except DomainError, e:
+        return True
+    except ConsoleError, e:
+        return True
+
+    domain.destroy()
+
+    return False
+    
+
 if __name__ == "__main__":
 
     timeStamp()
index ebe5c5ba6605677b397d06820b951977274bb9e0..11816d14ba9a28a67044007accee470a67deaded 100644 (file)
@@ -30,7 +30,7 @@ if status != 0:
     FAIL("xm mem-set %s %i returned invalid %i != 0" %
          (domain.getName(), domain.minSafeMem(), status))
 
-console.setLimit(8192)
+console.setLimit(65536)
 
 try:
     # See if this hits the byte limit
@@ -39,13 +39,15 @@ except ConsoleError, e:
     if e.reason == RUNAWAY:
         # Need to stop the domain before we restart the console daemon
         domain.destroy()
-        if verbose:
+        if isConsoleDead():
             print "*** Attempting restart of xenconsoled"
             s, o = traceCommand("killall xenconsoled")
             s, o = traceCommand("xenconsoled")
             if s != 0:
                 print "*** Starting xenconsoled failed: %i" % s
-        FAIL("Bug #380: I crashed the console system")
+            FAIL("Bug #380: I crashed the console system")
+        else:
+            FAIL("Bug #145: Ballooning DomU too low caused run-away")
     else:
         FAIL(str(e))